<!DOCTYPE html>
<html>
<head>
  <title>获取屏幕逻辑分辨率</title>
</head>
<body>
  <h1>屏幕逻辑分辨率</h1>

  <script>
    // 获取屏幕的逻辑分辨率
    const screenWidth = window.screen.width;
    const screenHeight = window.screen.height;

    // 在页面上显示屏幕逻辑分辨率
    document.write(`<p>屏幕宽度: ${screenWidth}px</p>`);
    document.write(`<p>屏幕高度: ${screenHeight}px</p>`);
  </script>
</body>
</html>